package com.ch;

import com.ch.tools.server.simulator.MapleServerManagerView;
import com.weibo.api.motan.common.MotanConstants;
import com.weibo.api.motan.util.MotanSwitcherUtil;
import de.felixroske.jfxsupport.AbstractJavaFxApplicationSupport;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;

@Slf4j
@SpringBootApplication(scanBasePackages = "com.ch")
@EntityScan(basePackages = "com.ch.ms.data.domain", basePackageClasses = Jsr310JpaConverters.class)
@EnableJpaAuditing
@EnableCaching
public class MapleServerManager extends AbstractJavaFxApplicationSupport {


    public static void main(String[] args) {

        launch(MapleServerManager.class, MapleServerManagerView.class, args);

        MotanSwitcherUtil.setSwitcherValue(MotanConstants.REGISTRY_HEARTBEAT_SWITCHER, true);
    }
}
